﻿@using mscook.mvc;
<div id="site-mast" class="site-mast visible-desktop">
    <div class="container site-mast__user-nav cf site-mast--poisearch">
        <ul class="mobile-info">

            <li class="user-info cf">
                @if (ViewData[ViewDataKeys.ISLOGIN] != null && ViewData[ViewDataKeys.ISLOGIN].ToString().ToLower() == "false")
                {
                    <span class="user-info__moto">请</span>
                    <a class="user-info__login" href="@Url.Action("Login", "Account")">登录</a>
                    <a class="user-info__signup" href="@Url.Action("Register", "Account")">免费注册</a>
                }
                else
                {
                    <span class="user-info__moto">你好</span>
                    <a class="user-info__login" href="center">@Html.Encode(ViewData[ViewDataKeys.USERNAME] == null ? "" : ViewData[ViewDataKeys.USERNAME])</a>
                }
                <a class="user-info__center" href="@Url.Action("index", "center")">会员中心></a>
            </li>

        </ul>
    </div>
</div>
@if (ViewData[ViewDataKeys.ISLOGIN] != null && ViewData[ViewDataKeys.ISLOGIN].ToString().ToLower() == "false")
{

    @Html.Partial("_LoginModal");
    @Html.Partial("_RegisterModal");
}
<!--./register_Modal-->
<div id="header" class="visible-desktop">
    <div class="container headerarea">
        <div class="row">
            <div class="span3">
                <div id="logo" class="visible-desktop">
                    <h2>
                        <a title="览月齐鲁" href="http://www.chu.sh." target="_parent"><strong>览月齐鲁</strong></a>
                    </h2>
                </div>
            </div>
            <!-- <div class="span3">
                <form class="form-search">
                  <input type="text" class="input-medium search-query">
                  <button type="submit" class="btn btn-warning">搜索</button>
                </form>
            </div>-->
            <div class="span5">
                <div class="full-search-bar">
                    <div class="search-triggers">
                        <ul class="switchable-nav">
                            <li class="SearchTab selected" data-url="@Url.Action("index", "cookbook")">
                                <a href="javascript:void(0);">新闻</a>
                            </li>

                            <li class="SearchTab" data-url="@Url.Action("index", "material")">
                                <a href="javascript:void(0);">排行</a>
                            </li>

                            <li class="SearchTab" data-url="@Url.Action("index", "chef")">
                                <a href="javascript:void(0);">名人</a>
                            </li>
                        </ul>
                    </div>
                    <ul class="item-stream unstyled search-input-stream">
                        <li class="stream-item stream-header search-input-item">
                            <form id="keywordSearch" class="form-inline search-form" action="@Url.Action("index", "cookbook")">
                                <input name="keyword" class="xlarge ui-autocomplete-input" id="keyword" role="textbox" aria-haspopup="true"
                                       aria-autocomplete="list" type="text" placeholder="输入您需要的新闻/名人" autocomplete="off">
                                <button class="btn btn-inverse" id="Button1" type="submit">
                                    <i class="icon-search icon-white"></i>
                                </button>
                            </form>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="span4 loginitem_h">
                @if (ViewData[ViewDataKeys.ISLOGIN] != null && ViewData[ViewDataKeys.ISLOGIN].ToString().ToLower() == "false")
                {
                    @*<a class="link header_login" href="#dialog-form-login" data-toggle="modal">登录</a>
        <a href="@Url.Action("Login", "Account")" class="link header_register">注册</a>
        <a href="@Url.Action("DengLu", "Account", new { pName = "Tencent" })" class="link header_tencentlogin">腾讯微博</a>
        <a href="@Url.Action("DengLu", "Account", new { pName = "Sina" })" class="link header_wblogin">微博登录</a>
    <a href="@Url.Action("QQLogin", "Account", new { pName = "QZone" })" class="link header_qqlogin">QQ登录</a>*@
                }
                else
                {
                    <a href="@Url.Action("LogOff", "Account")" class="link">退出登录</a>
                    <a href="@Url.Action("index", "center")" class="link">@Html.Encode("我的积分:" + ViewData[ViewDataKeys.BONUS])</a>

                }



            </div>
        </div>
    </div>
    <div class="clearfix">
    </div>
</div>
<div class="navbar navbar-inverse navbar-static-top" id="ms_navbar">
    <div class="navbar-inner">
        <div class="container">

            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
            </button>

            <a class="brand hidden-desktop" href="@Url.Action("index", "home")">览月齐鲁</a>


            <div class="nav-collapse collapse">
                <ul class="nav" id="navUl" data-active-li="@ViewContext.RouteData.Values["controller"].ToString()">
                    <li class="hidden-phone"><a>&nbsp;&nbsp;</a></li>
                    <li class=""><a href="@Url.Action("index", "home")"><strong>首页</strong></a> </li>
                    <li class=""><a href="@Url.Action("index", "magazine")"><strong>新闻阅读</strong></a> </li>
                    <li class=""><a href="@Url.Action("index", "bulletin")"><strong>今日关注</strong></a> </li>
                    @*<li class=""><a href="@Url.Action("index", "material")"><strong>食材超市</strong></a> </li>
                    <li class=""><a href="@Url.Action("index", "chef")"><strong>厨界名师</strong></a> </li>
                    <li class=""><a href="@Url.Action("index", "hotel")"><strong>旺店展示</strong></a> </li>*@
                    <li class=""><a href="@Url.Action("index", "cookbook")"><strong>新闻排行</strong></a> </li>

                </ul>
                <!--<form class="navbar-form pull-right">
                  <input class="span2" type="text" placeholder="邮箱">
                  <input class="span2" type="password" placeholder="密码">
                  <button type="submit" class="btn btn-warning">登录</button>
                  <button type="submit" class="btn btn-warning">注册</button>
                </form>-->
            </div>
        </div>
    </div>
</div>
<script src="~/bootstrap/js/jquery-1.9.1.js"></script>
<script type="text/javascript">
    
    $(function () {
       
        $('.search-triggers li').click(function(){
            if ($('.search-triggers').hasClass('triggers-hover')) {
                var url = $(this).data("url");
                $(this).addClass('selected').siblings('li').removeClass('selected');
                $('.search-triggers').removeClass('triggers-hover');
                $("#keywordSearch").attr("action", url);
                $("#phonekeywordSearch").attr("action", url);
            }
            else {
                $('.search-triggers').addClass('triggers-hover');
            }
        });
       
    })
</script>
